<%@ page import="com.chen.model.Goods" %>
<%@ page import="com.chen.service.GoodsService" %><%--
  Created by IntelliJ IDEA.
  User: ct
  Date: 2019/12/16
  Time: 15:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<% pageContext.setAttribute("PATH", request.getContextPath()); %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="Bookmark" href="/favicon.ico">
    <link rel="Shortcut Icon" href="/favicon.ico" />
    <link rel="stylesheet" type="text/css" href="${PATH}/static/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="${PATH}/static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="${PATH}/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="${PATH}/static/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="${PATH}/static/h-ui.admin/css/style.css" />

    <title>合同列表</title>
</head>

<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 发货单查看 <span
        class="c-gray en">&gt;</span> 发货单列表 <a class="btn btn-success radius r"
                                               style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i
        class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
    <div class="text-c">
        <%--<input type="text" class="input-text" style="width:250px" placeholder="输入合同编号" id="" name="">--%>
        <%--<button type="submit" class="btn btn-success" id="" name=""><i class="Hui-iconfont">&#xe665;</i>--%>
            <%--搜索</button>--%>
    </div>
    <div class="cl pd-5 bg-1 bk-gray mt-20">
        <span class="r">共有数据：<strong>${invoiceList.size()}</strong>
				条</span> </div>
    <table class="table table-border table-bordered table-bg">
        <thead>
        <tr>
            <th scope="col" colspan="9">发货单列表</th>
        </tr>
        <tr class="text-c">

            <th width="40">ID</th>
            <th width="40">合同编号</th>
            <th width="60">商品名称</th>
            <th width="60">商品数量</th>
            <th width="60">单价</th>
            <th width="60">总价</th>
            <th width="60">库存数量</th>
            <th width="60">物流公司</th>
            <th width="60">收件人</th>
            <th width="60">物流单号</th>
            <th width="60">收件地址</th>
            <th width="60">时间</th>
            <th width="60">发货单状态</th>

        </tr>
        </thead>
        <tbody>
        <c:forEach items="${invoiceList}" var="invoice">
            <%--<c:if test="${invoice.invoice_state!=0}">--%>
            <tr class="text-c">
                <td>${invoice.invoice_id}</td>
                <td>${invoice.contract.contract_id}</td>
                <td>${invoice.goods.goods_name}</td>
                <td>${invoice.goods_number}</td>
                <td>${invoice.goods_price}</td>
                <td>${invoice.goods_price*invoice.goods_number}</td>
                <td>${invoice.goods.goods_number}</td>
                <td>${invoice.delivery_company}</td>
                <td>${invoice.addressee}</td>
                <td>${invoice.address}</td>
                <td>${invoice.invoice_logistics}</td>
                <td><fmt:formatDate value="${invoice.invoice_time}" pattern="yyyy-MM-dd"/></td>
                    <%--<td>${contract.contract_time}</td>--%>
                <td class="td-status">
                    <c:if test="${invoice.invoice_state==0}">
                        <span class="label label-info radius">未发货</span>
                    </c:if>
                    <c:if test="${invoice.invoice_state==1}">
                        <span class="label label-default radius">已通知发货</span>
                    </c:if>
                    <c:if test="${invoice.invoice_state==2}">
                        <span class="label label-success radius">已发货</span>
                    </c:if>
                </td>

            </tr>
            <%--</c:if>--%>
        </c:forEach>

        </tbody>
    </table>
</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="${PATH}/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="${PATH}/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="${PATH}/static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="${PATH}/static/h-ui.admin/js/H-ui.admin.js"></script>
<!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="${PATH}/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${PATH}/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="${PATH}/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript">
    /*
        参数解释：
        title	标题
        url		请求的url
        id		需要操作的数据id
        w		弹出层宽度（缺省调默认值）
        h		弹出层高度（缺省调默认值）
    */
    /*管理员-增加*/
    function admin_add(title, url, w, h) {
        layer_show(title, url, w, h);
    }

    function admin_check(title, url, id, w, h) {
        layer_show(title, url, w, h);
    }

    /*管理员-编辑*/
    function admin_edit(title, url, id, w, h) {
        layer_show(title, url, w, h);
    }

</script>
</body>

</html>
